<?php
include_once 'conn.php';
$arr = [];
$sql = $db -> query("SELECT * FROM goods");
while($row = $sql -> fetch_assoc()){
    array_push($arr,$row);
}
echo json_encode($arr);
$db -> close();
?>